package com.prjsystem.action;

import com.opensymphony.xwork2.ActionSupport;
import com.prjsystem.entity.HomeBean;
import com.prjsystem.entity.WorkRequestViewBean;
import com.prjsystem.service.HomeService;
import com.prjsystem.service.WorkRequestService;

public class HomeAction extends ActionSupport{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1497565610119348818L;
	
	private HomeService homeService;
	private WorkRequestService workRequestService;
	private WorkRequestViewBean workRequestViewBean = new WorkRequestViewBean();
	private HomeBean homeBean = new HomeBean();
	
	public String init(){
		
		return SUCCESS;
	}
	
	/**
	 * 
	 * search information of home
	 */
	public String seachHomeInfo(){
		homeService.searchAllInfo(homeBean);
		return SUCCESS;
	}
	
	public String searchwrInfo(){
		workRequestService.getDetailWr(workRequestViewBean);
		return SUCCESS;
	}
	
	//create news
	public String createNews(){
		homeService.searchNewsList(homeBean);
		return SUCCESS;
	}
	
	public HomeService getHomeService() {
		return homeService;
	}

	public void setHomeService(HomeService homeService) {
		this.homeService = homeService;
	}

	public HomeBean getHomeBean() {
		return homeBean;
	}

	public void setHomeBean(HomeBean homeBean) {
		this.homeBean = homeBean;
	}
	
	public WorkRequestService getWorkRequestService() {
		return workRequestService;
	}

	public void setWorkRequestService(WorkRequestService workRequestService) {
		this.workRequestService = workRequestService;
	}

	public WorkRequestViewBean getWorkRequestViewBean() {
		return workRequestViewBean;
	}

	public void setWorkRequestViewBean(WorkRequestViewBean workRequestViewBean) {
		this.workRequestViewBean = workRequestViewBean;
	}

}
